﻿//Copyright (C) <2013>  <jonathan cleeve norton> All Rights Reserved 
//Contact jon.norton@fin-plus.co.uk website <http://www.fin-plus.co.uk/>
using System.Collections.Concurrent;

namespace FinPlusCompQuoteEngine
{
    public class FinPlusQuoteSpreads : ConcurrentDictionary<string, FinPlusQuoteSpread>
    {
        public FinPlusQuoteSpreads() { }

        public bool IsReady()
        {
            foreach (var spread in this.Values)
                if (!string.IsNullOrEmpty(spread.SpreadTo))
                    if (!spread.IsReadyBuy || !spread.IsReadySell)
                        return false;

            return true;
        }
    }
}
